/*!
 * 文库-共享 通用（请求）方法
 *  
 * 作者：张莉
 * Copyright (c) 2020/1/07
 * 
 */

/**
 * @method findDocLibraryList 他人共享查询列表
 * @param {object} data 存放搜索表格分页页数page、分页条数size、文件名或者textSearch贡献者对象
 * @return axios
 */
export const findDocShareList = (data) => {
  return axios({
    url: '/doclibrary/share/list',
    method: 'post',
    data
  })
}
/**
 * @method findDocShareManageList 共享管理查询列表
 * @param {object} data 存放搜索表格分页页数page、分页条数size、文件名或者textSearch对象
 * @return axios
 */
export const findDocShareManageList = (data) => {
  return axios({
    url: '/doclibrary/share/manageList',
    method: 'post',
    data
  })
}
/**
 * @method findDocShareManageCancel 取消共享
 * @param {string} id 存放分享数据的docShareId
 * @return axios
 */
export const findDocShareManageCancel = (id) => {
  return axios({
    url: `/doclibrary/share/cancel/${id}`,
    method: 'delete'
  })
}
/**
 * @method eosDictChildren 文库共享有效日
 * @param {string} id  字典里的文库共享有效日主键dictId
 * @return axios
 */
export const eosDictChildren = (id) => {
  return axios.get(`/base/dict/children/${id}`)
}
// 新增共享
export const shareInsertShare = (params) => {
  return axios.post('/doclibrary/share/insertShare', params)
}